import $copy from '@utils/copy'

const Index = ({ column, model }) => {
	window.$formModalRef().open({
		modal: {
			title 		: '复制后端',
			width 		: '100%',
			height 		: '100%',
			maxWidth 	: null,
			controls: {
				ok: 0,
				after:[
					{ label:'复制 Column', click: () => $copy(window.$formModalRef().formRef().getValue('column')) },
					{ label:'复制 Model', click: () => $copy(window.$formModalRef().formRef().getValue('model')) }
				]
			}
		},
		form: {
			labelWidth 	: 's10',
			className 	: 'pre-form',
			param : { column, model  },
			data: [
				{ name:'column', type:'textarea', maxLength: null },
				{ name:'model', type:'textarea', maxLength: null },
			],
		}
	})
}
export default Index